/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package yudisium;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextField;

public class PanelKelasSekretariat extends JPanel {

    JTextField textFieldtglAwal = new javax.swing.JTextField();
    JTextField textFieldtglAkhir = new javax.swing.JTextField();

    public PanelKelasSekretariat() {


        // Setting Frame
        this.setSize(300, 100);
        this.setLayout(null);
//      Setting   tittle
        JLabel tittle = new JLabel();
        tittle.setFont(new java.awt.Font("Tahoma", 0, 18));
        tittle.setText("Sekretariat");
        this.add(tittle);
        tittle.setBounds(120, 30, 270, 30);

        JLabel label = new JLabel();
        label.setText("Tanggal Awal");
        this.add(label);
        label.setBounds(25, 80, 90, 16);
        textFieldtglAwal.setText(" ");
        this.add(textFieldtglAwal);
        textFieldtglAwal.setBounds(125, 80, 180, 20);
//      Setting   nama
        JLabel koleksi = new JLabel();
        koleksi.setText("Tanggal Akhir");
        this.add(koleksi);
        koleksi.setBounds(25, 105, 100, 26);
        textFieldtglAkhir.setText(" ");
        this.add(textFieldtglAkhir);
        textFieldtglAkhir.setBounds(125, 110, 180, 20);
        //Setting button  simpan
        JButton btSimpan = new JButton();
        btSimpan.setText("Simpan");
        this.add(btSimpan);
        btSimpan.setBounds(110, 150, 80, 35);
        btSimpan.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                simpanAction();
            }

            public void simpanAction() {
//               Pinjaman pinj = new Pinjaman();
            }
        });
// Setting button  batal
        JButton btBatal = new JButton();
        btBatal.setText("Batal");
        this.add(btBatal);
        btBatal.setBounds(220, 150, 70, 35);

      JButton  btKeluar = new JButton("Keluar");
        btKeluar.setBounds(330, 150, 90, 35);
        btKeluar.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                JFrame frame = new JFrame();
                FrameUtama fr = new FrameUtama();
                fr.transferFocusBackward();
            }
        });
        this.add(btKeluar);
    }
}
